import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Index from '@/components/main/index'
//import playList from '@/components/list/playlist'


Vue.use(Router)
//const playList = ()=> import('@/components/list/playlist')
//const play =(resolve) => {require(['@/components/list/play'],resolve)}
export default new Router({
  routes: [
    {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
     path:'/',
     name:Index,
     component: Index
    },
    {
      path:'/playList/:id',
      name:'playList',
      component: ()=>import('@/components/list/playlist')
    },
    {
      path:'/play',
      name:'play',
      component:(resolve) => {require(['@/components/list/play'],resolve)}
    }
  ]
})
